import { Module } from '@nestjs/common'
import { ConfigModule } from '@nestjs/config'
import { AuthModule } from './modules/auth/auth.module'
import { UserModule } from './modules/user/user.module'
import { PrismaModule } from './common/modules/prisma/prisma.module'
import { UploadModule } from './common/modules/upload/upload.module'
import { RoleModule } from './modules/role/role.module'
import { MenuModule } from './modules/menu/menu.module'
import { RolemenuModule } from './modules/rolemenu/rolemenu.module'
import { EmailModule } from './common/modules/email/email.module'
import app from './config/app.config'
@Module({
  imports: [
    ConfigModule.forRoot({
      isGlobal: true,
      load: [app],
      envFilePath: `.env.${process.env.$NODE_ENV.trim()}`,
    }),
    AuthModule,
    UserModule,
    PrismaModule,
    UploadModule,
    RoleModule,
    MenuModule,
    RolemenuModule,
    EmailModule,
  ],
  providers: [],
})
export class AppModule {}
